package com.appwoo.txtws.service;

import android.content.Context;
import com.appwoo.android.exception.NotFoundNetWorkException;
import com.appwoo.android.exception.TimeOutException;
import com.appwoo.txtws.bean.StateBean;
import com.appwoo.txtws.bean.TrafficBean;
import com.appwoo.txtws.component.DBHelper;
import com.appwoo.txtws.component.Global;
import java.io.IOException;
import java.util.ArrayList;
import org.xmlpull.v1.XmlPullParserException;

public class RQFlowSoft
{
  private Context context;

  public RQFlowSoft(Context paramContext)
  {
    this.context = paramContext;
  }

  public StateBean adSoftFlow(ArrayList<TrafficBean> paramArrayList, String paramString)
  {
    Object localObject = null;
    try
    {
      localObject = new LoginService().addSoftFlowList(paramString, Global.getIMEI(this.context), paramArrayList, this.context);
      if (localObject == null)
      {
        StateBean localStateBean = new StateBean();
        localObject = localStateBean;
      }
      return localObject;
    }
    catch (IOException localIOException)
    {
      localIOException.printStackTrace();
      return localObject;
    }
    catch (XmlPullParserException localXmlPullParserException)
    {
      localXmlPullParserException.printStackTrace();
      return localObject;
    }
    catch (TimeOutException localTimeOutException)
    {
      localTimeOutException.printStackTrace();
      return localObject;
    }
    catch (NotFoundNetWorkException localNotFoundNetWorkException)
    {
      localNotFoundNetWorkException.printStackTrace();
    }
    return localObject;
  }

  public StateBean adSoftUsing(ArrayList<TrafficBean> paramArrayList, String paramString)
  {
    Object localObject = null;
    try
    {
      localObject = new LoginService().adSoftUsing(paramString, Global.getIMEI(this.context), paramArrayList, this.context);
      if (localObject == null)
      {
        StateBean localStateBean = new StateBean();
        localObject = localStateBean;
      }
      return localObject;
    }
    catch (IOException localIOException)
    {
      localIOException.printStackTrace();
      return localObject;
    }
    catch (XmlPullParserException localXmlPullParserException)
    {
      localXmlPullParserException.printStackTrace();
      return localObject;
    }
    catch (TimeOutException localTimeOutException)
    {
      localTimeOutException.printStackTrace();
      return localObject;
    }
    catch (NotFoundNetWorkException localNotFoundNetWorkException)
    {
      localNotFoundNetWorkException.printStackTrace();
    }
    return localObject;
  }

  public StateBean adSoftUsingUs(ArrayList<TrafficBean> paramArrayList, String paramString)
  {
    Object localObject = null;
    try
    {
      localObject = new LoginService().adSoftUsingUs(paramString, Global.getIMEI(this.context), paramArrayList, this.context);
      if (localObject == null)
      {
        StateBean localStateBean = new StateBean();
        localObject = localStateBean;
      }
      return localObject;
    }
    catch (IOException localIOException)
    {
      localIOException.printStackTrace();
      return localObject;
    }
    catch (XmlPullParserException localXmlPullParserException)
    {
      localXmlPullParserException.printStackTrace();
      return localObject;
    }
    catch (TimeOutException localTimeOutException)
    {
      localTimeOutException.printStackTrace();
      return localObject;
    }
    catch (NotFoundNetWorkException localNotFoundNetWorkException)
    {
      localNotFoundNetWorkException.printStackTrace();
    }
    return localObject;
  }

  public boolean isRunningCheck()
  {
    boolean bool = false;
    DBHelper localDBHelper = new DBHelper(this.context);
    new ArrayList();
    ArrayList localArrayList1 = localDBHelper.getProApp();
    new ArrayList();
    ArrayList localArrayList2 = localDBHelper.getTempSofts();
    int i = localArrayList1.size();
    int j = localArrayList2.size();
    int k = 0;
    if (k >= i)
      label66: return bool;
    String str = ((TrafficBean)localArrayList1.get(k)).getPackageName();
    label129: for (int m = 0; ; m++)
    {
      if (m >= j);
      while (true)
      {
        if (bool)
          break label127;
        k++;
        break;
        if (!((TrafficBean)localArrayList2.get(m)).getPackageName().equals(str))
          break label129;
        bool = true;
      }
      label127: break label66;
    }
  }

  public ArrayList<TrafficBean> rqFlowList()
  {
    new ArrayList();
    return new DBHelper(this.context).getSoftFlow();
  }

  public void rqProApp(ArrayList<TrafficBean> paramArrayList)
  {
    if (paramArrayList.size() > 0)
      new DBHelper(this.context).insertProApp(paramArrayList);
  }

  public ArrayList<TrafficBean> rqSoftList()
  {
    new ArrayList();
    return new DBHelper(this.context).getSoftsListToUpload();
  }

  public ArrayList<TrafficBean> rqSoftUsingList()
  {
    new ArrayList();
    return new DBHelper(this.context).getSofts();
  }
}

/* Location:           C:\Documents and Settings\Administrator\classes_dex2jar.jar
 * Qualified Name:     com.appwoo.txtws.service.RQFlowSoft
 * JD-Core Version:    0.6.2
 */